package cn.lijiajia3515.cairo.system.modules.area;

import cn.lijiajia3515.cairo.core.extension.Extension;

import java.util.Arrays;
import java.util.Set;
import java.util.stream.Collectors;

public enum AreaExtension implements Extension<AreaField> {
	BASIC(AreaField.ID, AreaField.NAME),
	INFO(AreaField.ID, AreaField.NAME, AreaField.PARENT, AreaField.LEVEL),
	ALL(AreaField.ID, AreaField.NAME, AreaField.PARENT, AreaField.LEVEL, AreaField.IDS, AreaField.NAMES);

	private final Set<AreaField> fields;

	AreaExtension(AreaField... fields) {
		this.fields = Arrays.stream(fields).collect(Collectors.toUnmodifiableSet());
	}

	@Override
	public Set<AreaField> fields() {
		return fields;
	}
}
